<?php
    //debug($json_data);
?>
<table class="table" id="repayment_detail_flex">
    <thead>
    <tr>
        <th>Month</th>
        <th>Repayment Schedule</th>
        <th>Expected <?php echo $json_data['Sale']['currency']?></th>
        <th>Actual  <?php echo $json_data['Sale']['currency']?></th>
        <th>Outstanding  <?php echo $json_data['Sale']['currency']?></th>
    </tr>
    </thead>
    <tbody>
    <?php
        if(isset($json_data['Sale'])){
            $data = $json_data['Sale']['repayment'];
            foreach($data as $row){
            ?>
                <tr>
                    <td><?php echo $row[0]?></td>
                    <td><?php echo $row[1]?></td>
                    <td><?php echo $row[2]?></td>
                    <td><?php echo $row[3]?></td>
                    <td><?php echo $row[4]?></td>
                </tr>
            <?php
            }
        }
    ?>
    </tbody>
</table>

<?php echo $print_statement; ?>


